package com.cskaoyan._06oop3._03interface._01introduct;

/**
 * @author Macro_Ray
 * @since 2024/3/12 10:29
 */
public class Demo2 {
    public static void main(String[] args) {
        // Sparrow这个类，继承了Animal1这个类，实现了IFly1这个接口
        Animal1 animal1 = new Sparrow();
        animal1.eat();
    }
}

interface IFly1{
    void fly();
}

class Animal1{
    public void eat(){
        System.out.println("动物进食");
    }
}


class Sparrow extends Animal1 implements IFly1{

    @Override
    public void fly() {

    }
}
